const koa = require("koa");
const path = require("path");
const static = require('koa-static');
// 开启https
const https = require('https');
const fs = require('fs');

const app = new koa()
const staticPath = static(path.join('/data/00/kh-tool-doc'))

app.use(staticPath)

const options = {
    key: fs.readFileSync("/data/https-ssl/vscode.wang.key"),
    cert: fs.readFileSync("/data/https-ssl/vscode.wang.pem")
};

https.createServer(options, app.callback()).listen(8080);